<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>

<%//String code = ImageUtil.getRandomNumber(4) ;
			//session.setAttribute(Constant.SESSION_VERIFY_CODE, code) ;
			String path = request.getContextPath();

			%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link href="<%=path%>/css/sinfo.css" rel="stylesheet" type="text/css" />
        <link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
        <link href="<%=path%>/css/newstyle.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/common.css" rel="stylesheet" type="text/css" />
		<script type='text/javascript' src='<%=path%>/dwr/util.js'></script>
		<script type='text/javascript' src='<%=path%>/dwr/engine.js'></script>
		<script type='text/javascript' src='<%=path%>/dwr/interface/accountTemplate.js'></script>
		<script type='text/javascript' src='<%=path%>/js/vnv/commonForManage.js'></script>
		<script language="JavaScript" type="text/JavaScript">
function dosubmit(startPage){
	var amount = document.getElementById("count");
	if(checkNecessaryInput(document.forms["0"])){
		document.getElementById("whichPage").value="2";
		if (document.getElementById("accountFrom").value ==
			document.getElementById("accountTo").value ){
				alert('请选择不同的子账户');
				return;
		}
		document.forms["0"].submit();
	}
}

function updatePrompt(data) {
   if (data==2){
    	alert('此账户没有足够资金，请重新输入！');
    	document.getElementById("count").value = "";
   }else if (data==1){
    	alert('资金输入不正确！');
    	document.getElementById("count").value = "";
   }
}	

function setFromMoney(data) {
	getObj('accountFromMoney').value = data;
}				

function setToMoney(data) {
	getObj('accountToMoney').value = data;
}															
</script>

	</head>

	<body>
<table width="732" border="0" align="center" cellpadding="0" cellspacing="3" bgcolor="0EA2D6">
  <tr> 
    <td  bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="25" align="center" background="<%=path%>/images/new/blue_pic_01.gif"><strong><font color="#FFFFFF" style="font-size:12px"> 
            子账户转账</font></strong></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="8" ><img src="<%=path%>/images/new/blue_pic_02.gif" width="726" height="8" /></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="8">
        <tr> 
          <td> 	<div class="panel">
		<html:form action="subAccountOut.do" method="post">
			<input name="whichPage" type="hidden" value="1">
			<div class="comment" style="text-align:center;font-size:12;font-weight:bold;">
				<img src="<%=path%>/images/new2_23_2.gif" width="21" height="21" align="absmiddle" />
				<span> 填写转账信息</span>
				<img src="<%=path%>/images/new2_24.gif" width="21" height="21" align="absmiddle" />
				<span> 转账结果</span>
			</div>
			  <table  width="95%" cellpadding="3" cellspacing="1" class="form">
                <tr bgcolor="#F0FAFD"> 
                  <th>转出子账户：</th>
					
                  <td> <html:select property="accountFrom" alt="转出子账户" onchange="accountMoney.accountMoney(this,setFromMoney)"> 
                    <html:options collection="subAccount" property="id" labelProperty="accountName"/> 
                    </html:select> </td>
				</tr>
				<tr>
				<th>转出子账户余额：</th>
					
                  <td><span id="accountFromMoney"></span></td>
				</tr>
				<tr><th>转入子账户：</th>
					<td>
						<html:select property="accountTo" alt="转出入账户" onchange="accountMoney.accountMoney(this,setToMoney)">
							<html:options collection="subAccount" property="id" labelProperty="accountName" />
						</html:select>
					</td>
				</tr>
				<tr>
				<th>转入子账户余额：</th>
					
                  <td><span id="accountToMoney"></span></td>
				</tr>
				<tr bgcolor="#F0FAFD"> 
                  <th>转账金额：</th>
					
                  <td> <html:text property="count" size="30" 
						alt="转账金额" onblur="if(checkDecimalInput(this,0)){accountTemplate.compareAccountMoney(this.form.accountFrom.value,this.value, updatePrompt) ;}"/>元* 
                    <%--<span title="请点击此按钮，输入转账金额" onClick="moneySelect('count','<%=path%>')" style="cursor:hand"> 
                    <a href="#"> <img src="<%=path%>/images/chickchoicmoney.jpg" width="31" height="31" border="0"> 
                    </a> </span> --%><span title="请使用计算器，计算转账金额" onClick="calculatorSelect('count','<%=path%>')" style="cursor:hand"> 
                    <a href="#"> <img src="<%=path%>/images/calculator.jpg" width="31" height="31" border="0"> 
                    </a> </span> </td>
				</tr>
			    <tr><td colspan="2" ><hr noshade="noshade" size="2" color="#0EA2D6" /></td></tr>
				<tr>
					<td colspan="2" style="text-align:right;">
							<button class="button_3" onclick="dosubmit(2)">确 定</button>
							
					</td>
				</tr>
		</table>
		</html:form>
	</div>
 </td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>